﻿using Atha.Contracts;

namespace Atha
{
	public sealed class EqualityTestResult : ITestRunTestResult
	{
		private readonly ITestRunTestResultStatus _testRunTestResultStatus;

		public EqualityTestResult(string name, bool expression)
		{
			this.Name = name;
			this._testRunTestResultStatus = expression ? Athacore.BuiltIn.TestStatus.Succeeded : Athacore.BuiltIn.TestStatus.Failed;
		}

		public string Name { get; private set; }

		public bool Has(ITestRunTestResultStatus testRunTestResultStatus)
		{
			return this.Is(testRunTestResultStatus);
		}

		public bool Is(ITestRunTestResultStatus testRunTestResultStatus)
		{
			return this._testRunTestResultStatus.Equals(testRunTestResultStatus);
		}
	}
}